package pattern12.overtime;

/**
 * 加班的示例
 * @author wdl
 */
public class OverTime {
    public static void main(String[] args) {
        //紧急任务
        Work emergencyProjects=new Work(new ForenoonState());
        emergencyProjects.setHour(9);
        emergencyProjects.writeProgram();

        emergencyProjects.setHour(10);
        emergencyProjects.writeProgram();

        emergencyProjects.setHour(12);
        emergencyProjects.writeProgram();

        emergencyProjects.setHour(13);
        emergencyProjects.writeProgram();

        emergencyProjects.setHour(14);
        emergencyProjects.writeProgram();

        emergencyProjects.setHour(17);
        emergencyProjects.setFinishWork(false);
//        emergencyProjects.setFinishWork(true);
        emergencyProjects.writeProgram();

        emergencyProjects.setHour(22);
        emergencyProjects.writeProgram();
    }
}
